package it.unisa.unibox.junit.beans;

import it.unisa.unibox.beans.Dipartimento;
import junit.framework.TestCase;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class DipartimentoTest extends TestCase {

	private Dipartimento dip;

	@Override
	@Before
	public void setUp() {
		try {
			dip=new Dipartimento(0,"Informatica");
		} catch (Exception e) {
			fail();
		}
	}

	@Override
	@After
	public void tearDown() {
		dip=null;
		System.gc();	
	}

	@Test
	public void testGetId() {
		int id = dip.getId();
		assertEquals(id,0);
	}
	
	@Test
	public void testSetId() {
		//dip.setId(1);
		//assertEquals(dip.getId(),1);
	}

	@Test
	public void testGetNome() {
		assertEquals(dip.getNome(),"Informatica");
	}

}
